package ua.yandex.skipasssystem.skipass.validators;

import ua.yandex.skipasssystem.skipass.SkiPass;
import ua.yandex.skipasssystem.skipass.WithDaysOfWorkSkiPass;

import java.time.LocalDateTime;

public abstract class WithDaysOfWorkingSkiPassValidator extends Validator {
    boolean isWorkAtDay(SkiPass skiPass,
                        LocalDateTime dateTime) {
        return ((WithDaysOfWorkSkiPass) skiPass).
                isWorkAtDay(dateTime.getDayOfWeek());
    }
}
